<template>
	<view class="bg">
		<view class="logo">
			<img src="../../static/icon/launch_logo.png" alt="">
		</view>
		<view class="title_1">
			畅阳题库
		</view>
		<view class="title_2">
			欢迎来到畅阳题库
		</view>
		<view class="img">
			<img :src="imageUrls+'/icon/launch_img.png'" alt="">
		</view>
	</view>
</template>

<script>
	import {
		getToken,
		getMajorInfo
	} from '@/common/util/index.js'
	export default {
		data() {
			return {
				imageUrls: getApp().globalData.imaeWd,
			}
		},
		methods: {
			go_index() {
				console.log('三秒启动');
				setTimeout(function() {
					console.log('启动:', getToken());
					// if (!getToken()) {
					// 	uni.redirectTo({
					// 		url: "/pages/setmajor/demo?new=1"
					// 	})
					// } else {
					// uni.redirectTo({
					// 	url: "/pages/index/index"
					// })
					uni.reLaunch({
						url:"/pages/index/index"
					})
					// }
					// uni.redirectTo({
					// 	url: "/pages/index/index"
					// })
					clearTimeout()
				}, 3000)
			}
		},
		onLoad() {
			this.go_index()
		}
	}
</script>

<style lang="scss" scoped>
	.bg {
		box-sizing: border-box;
		height: 100vh;
		background-color: #0390a0;
		padding-top: 210rpx;
	}

	.logo {
		margin: 0 auto;
		height: 165rpx;
		width: 165rpx;

		img {
			width: 100%;
			height: 100%;
		}
	}

	.title_1 {
		margin-top: 50rpx;
		text-align: center;
		font-size: 50rpx;
		font-family: PingFang SC;
		font-weight: bold;
		color: #FFFFFF;
	}

	.title_2 {
		margin-top: 70rpx;
		text-align: center;
		font-size: 32rpx;
		font-family: PingFang SC;
		font-weight: 400;
		color: #FFFFFF;
	}

	.img {
		margin-top: 65rpx;
		margin-left: 100rpx;
		width: 650rpx;
		height: 810rpx;

		img {
			width: 100%;
			height: 100%;
		}
	}
</style>
